package com.itheima.test;

import java.io.*;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

/**
 * @Author:gy
 * @Date: 2025/09/03 8:46
 * @Description:
 */
public class Demo {
        public static void main(String[] args) throws IOException {
            BufferedReader br = new BufferedReader(new FileReader("Day12\\a.txt"));
            String s = br.readLine();
            br.close();
            String[] strings = s.split(" ");
            List<Integer> list = new ArrayList<>();
            for (int i = 0; i < strings.length; i++) {
                list.add(Integer.parseInt(strings[i]));
            }
            list.sort((a,b)->a-b);
            BufferedWriter bw = new BufferedWriter(new FileWriter("Day12\\a.txt"));
            for (int i = 0; i < list.size(); i++) {
                bw.write(list.get(i)+" ");
            }
            bw.close();
        }
    }

